﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GroundEvent : MonoBehaviour {

    public AudioClip GroundSplitClip;
    public AudioClip GroundRiseClip;
    public AudioClip ShineClip;
    public AudioClip GlassSplitClip;

    private AudioSource audios;

    private void Start()
    {
        audios = Camera.main.GetComponent<AudioSource>();
    }

    void MusicBegin()
    {
        audios.clip = GroundSplitClip;
        audios.Play();
        audios.loop = false;
    }

    void GroundUp()
    {
        audios.clip = GroundRiseClip;
        audios.Play();
        audios.loop = true;
    }

    void Shine()
    {
        audios.clip = ShineClip;
        audios.Play();
    }

    void ShineEnd()
    {
        //audios.Stop();
    }

    void MusicEnd()
    {
        audios.Stop();
    }
}
